<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title>物业管理系统</title>
		
		<base href="<%=basePath%>">
		<link rel="stylesheet" href="css/bootstrap.css">
		<link rel="stylesheet" href="css/vivo.css">
		<link rel="stylesheet" href="css/cmxform.css">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<link rel="stylesheet" href="js/grid/bsgrid.all.min.css" />
		<link rel="stylesheet" type="text/css" href="js/Hui-iconfont/1.0.7/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="js/icheck/icheck.css" />
	
		
		<script src="js/jquery-1.11.1.js"></script>
		<link href="js/select2/select2.min.css" type="text/css" rel="stylesheet" />
		<script src="js/select2/select2.min.js"></script>
		<script src="js/jquery.validation/1.14.0/jquery.validate.min.js"></script>
		<script src="js/jquery.validation/1.14.0/messages_zh.min.js"></script>
		<script type="text/javascript" src="js/sharefunction.js"></script>
		<script language="javascript" type="text/javascript" src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>

		<style type="text/css">
			.primary-vdd {
				color: #fff;
				background-color: #5a98de;
				border-color: #5a98de
			}
			
			.primary-vdd:hover {
				color: #fff;
				background-color: #0a6999;
				border-color: #0a6999
			}
		</style>
		<script type="text/javascript">
			
			$(document).ready(function() {
				
				
			});
		
			//存盘数据
			function saveUserPwd() {
				var url = "admin/org/user/saveUserPwd";
				var userId = "${userObj.userId }";
				var userPwd = $("#loginPwd").val();
				var userPwd2 = $("#loginPwd2").val();
				if(userPwd==""){
					alert("请填写用户密码哦！");
					return false;
				}
				if(userPwd2==""){
					alert("请填写确认用户密码哦！");
					return false;
				}
				if(userPwd!=userPwd2){
					alert("两次密码输入不一致，请重新输入！");
					return false;
				}
				
				jQuery.ajax({
					type : "post",
					async : false,
					url : url,
					dataType : "json",
					data : {
						userId : userId,
						userPwd : userPwd
					},
					success : function(data) {
						if (data.success) {
							closeLayerAndMsg(data.msg);
						} else {
							closeLayerAndMsg(data.msg);
						}
					}
				});
			}
			
		</script>
	
	</head>
	<body>
		<div class="panel panel-default">
		  <div class="panel-body">
		   	<table cellpadding="10" cellspacing="5" class="mytable">
				<tr>
					<td width="100">用户名</td>
					<td>
						${userObj.userName }
					</td>
				</tr>
				<tr>
					<td>用户密码</td>
					<td ><input type="password" id="loginPwd" name="loginPwd" /></td>
				</tr>
				<tr>
					<td>确认密码</td>
					<td ><input type="password" id="loginPwd2" name="loginPwd2" /></td>
				</tr>
			</table>
		  </div>
		</div>
		<div style="width: 100%; text-align: center; padding-top: 20px">
			<button class="btn btn-primary radius primary-vdd" type="button" onclick="saveUserPwd()">重置密码</button>
			<a class="btn btn-default radius" onClick="closeLayer();"> 取 消 </a>
			<br />
		</div>
		
		<div style="display:none">
			<input id="userId" name="userId" type="hidden" value="${userId}" />
		</div>
	</body>
</html>